# $Id: PKGBUILD 55573 2011-09-14 10:41:16Z andrea $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=splint
pkgver=3.1.2
pkgrel=3
pkgdesc="A tool for statically checking C programs for security vulnerabilities and coding mistakes"
arch=('i686' 'x86_64')
url="http://www.splint.org/"
license=('GPL')
depends=('glibc')
source=("http://www.splint.org/downloads/${pkgname}-${pkgver}.src.tgz"
    	'splint.sh')
md5sums=('25f47d70bd9c8bdddf6b03de5949c4fd'
         '0efb6341b384dc44590989fe3678c96c')
options=('!makeflags')

build() {
  cd "${srcdir}"/$pkgname-$pkgver
  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver
  make DESTDIR="${pkgdir}" install

  install -D -m755 "${srcdir}"/splint.sh "${pkgdir}"/etc/profile.d/splint.sh
}
